﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Project.Apps.PersonApp.Dto;
using System.Threading.Tasks;

namespace Project.Persons
{
    public interface IPersonAppService : IApplicationService
    {
        /// <summary>
        /// 添加或修改
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> InsertOrUpdatePerson(PersonDto input);

        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task DeletePerson(EntityDto input);

        /// <summary>
        /// 单条查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PersonDto> GetPerson(EntityDto input);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<PersonDto>> GetPersonPages(PersonFilter input);

    }




    //public class getpersonInput :  PagedAndSortedResultRequestDto
    //{
    //    public virtual string Filter { get; set; }
    //}

    //[AutoMap(typeof(Person))]
    //public class getPersonDto {   //实体映射关系

    //    public virtual int id { get; set; }

    //    public virtual string name { get; set; }

    //    public virtual string address { get; set; }

    //    public virtual string telephone { get; set; }
    //}



    //[AutoMapFrom(typeof(Person))]
    //public class sortpersonDto
    //{
    //    public virtual int id { get; set; }
    //    public virtual string name { get; set; }

    //}
}
